package Entities;

import java.io.Serializable;
import java.util.Date;
import java.util.List;

import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.OneToMany;
import javax.persistence.Table;
@Entity
@Table(name =  "Carta")
public class Entity_Carta implements Serializable{

	private static final long serialVersionUID = 1L;
	@Id
	@GeneratedValue
	@Column(name = "id_carta")
	private int idCarta;
	@OneToMany(cascade = CascadeType.ALL)
	@JoinColumn(name = "id_carta")
	private List<Entity_ItemCarta> itemCartas;
	@Column
	private Date vigencia;
	

	//GET & SET
	public List<Entity_ItemCarta> getItemCartas() {
		return itemCartas;
	}
	
	public void setItemCartas(List<Entity_ItemCarta> itemCartas) {
		this.itemCartas = itemCartas;
	}
	
	public int getIdCarta() {
		return idCarta;
	}
	
	public Date getVigencia() {
		return vigencia;
	}
	public void setVigencia(Date vigencia) {
		this.vigencia = vigencia;
	}

	public void setIdCarta(int idCarta) {
		this.idCarta = idCarta;
	}
	
	

}
